package com.Result;

public enum StatusCode {
	/**
     * @apiDefine error_msg 全局配置失败响应信息
     * @apiError 1001 保存失败
     * @apiError 1002 修改失败
     * @apiError 1003 删除失败
     * @apiError 1004 上传失败
     * @apiError 1005 注册失败
     * @apiError 1101 输入参数格式不正确
     * @apiError 1102 用户名或者密码错误
     * @apiError 1103 用户名不存在
     * @apiError 1201 发送手机注册验证码失败
     * @apiError 1202 用户注册失败
     * @apiError 1203 机构不存在
     * @apiError 1204 注册验证码输入错误
     * @apiError 1205 手机号码已存在
     * @apiError 1206 用户名已存在
     * @apiError 1207 机构不存在
     * @apiError 1208 手机或者用户名已存在
     * @apiError 4101 token过期
     * @apiError 4102 token签名错误
     * @apiError 4103 无效token
     * @apiError 4104 token格式错误
     * @apiError 5000 接口内部错误
     * @apiErrorExample 错误响应例子:
     *     {
     *       "code": 1101,
     *       "msg": "输入参数格式不正确",
     *       "res": "",
     *       "timestamp": 1489110927975
     *     }
     *
     */
 
    /**
     * @apiDefine success_msg 全局配置成功响应信息
     * @apiSuccess (success 2000) {Date}  Date     时间戳
     * @apiSuccess (success 2000) {Integer} code        响应码
     * @apiSuccess (success 2000) {String}  msg       响应信息
     * @apiSuccess (success 2000) {Object}  res   响应实体
     */
 

	unknown(110, "未知错误"),
	jsonDeserializeFail(111,"反序列化错误"),
	jsonSerializeFail(112,"序列化错误"),
	registSuccess(1001,"注册成功"),
	loginNameUsed(1002,"该用户名已经存在"),
	emptyRegistInfor(1003,"注册信息不完整"),
	passwordSimple(1004,"密码过于简单"),
	userInsertFail(1005,"用户插入失败"),
	studentInsertFail(1006,"学生表插入失败"),
	adminInsertFail(1007,"管理员表插入失败"),

	
	
	updatePasswordSuccess(1030,"更新密码成功"),
	updatePasswordFailOldNotMatch(1031,"原密码错误"),
	updatePasswordFail(1032,"更新密码失败"),
	
	updateLoginNameSuccess(1040,"更新登录名成功"),
	updateLoginNameFail(1041,"更新登录名失败"),
	updateLoginNameFailPasswd(1041,"输入的密码错误"),
	
	updatestudentInforSuccess(1050,"更新学生信息成功"),
	updatestudentInforFail(1051,"更新学生信息失败"),
	updatestudentInforIDFail(1052,"学生ID错误"),
	
	getstudentInforSuccess(1060,"获取学生信息成功"),
	getstudentInforFail(1061,"没有找对对应的学生信息"),
	
	studentLoginSuccess(2001, "学生用户登录成功"), 
	loginFail(2004,"用户名或密码错误"),
	userIdentityError(2005,"userIdentity错误"),
	AdminLoginSuccess(2006, "管理员用户登录成功"), 
	
	
	DormitoryInquireSuccess(3010,"宿舍信息查询成功"),
	DormitoryInquireFail(3011,"没有符合条件的宿舍信息"),
	DormitoryUpdateSuccess(3020,"宿舍信息更新成功"),
	DormitoryUpdateFail(3021,"宿舍信息更新失败"),
	DormitoryInsertSuccess(3030,"新增宿舍信息成功"),
	DormitoryInsertFail(3031,"新增宿舍信息失败"),
	DormitoryDeleteSuccess(3040,"删除宿舍信息成功"),
	DormitoryDeleteFail(3041,"删除宿舍信息失败"),
	
	WasherInquireSuccess(3050,"洗衣机信息查询成功"),
	WasherInquireFail(3051,"没有符合条件的洗衣机信息"),
	WasherUpdateSuccess(3060,"洗衣机信息更新成功"),
	WasherUpdateFail(3061,"洗衣机信息更新失败"),
	WasherInsertSuccess(3070,"新增洗衣机信息成功"),
	WasherInsertFail(3071,"新增洗衣机信息失败"),
	WasherDeleteSuccess(3080,"删除洗衣机信息成功"),
	WasherDeleteFail(3081,"删除洗衣机信息失败"),
	
	orderInquireSuccess(4000,"订单查询成功"),
	orderInquireFail(4001,"没有找到相应订单"),
	
	
	submitOrderSuccess(5010,"提交订单成功"),
	submitOrderFailStore(5011,"商品库存不足或订单价格有变"),
	submitOrderFailCargo(5012,"更新商品库存失败"),
	submitOrderFailOrder(5013,"更新订单表失败"),
	submitOrderFailOrderItem(5014,"更新订单项表失败"),
	
	studentOrderModifySuccess(5020,"学生修改订单成功"),
	studentOrderModifyFailStatus(5021,"订单状态已变 "),
	studentOrderModifyFailOrder(5022,"更新订单表失败"),
	

	studentConfirmSuccess(5040,"学生确认成功"),
	studentOrderConfirmFailStatus(5041,"无需确认"),
	studentWithdrawSuccess(5050,"学生撤销订单成功"),
	studentWithdrawFail(5051,"学生撤销订单失败"),
	studentPayedSuccess(5060,"付款成功"),
	studentPayedFail(5061,"付款失败"),
	studentWashoverSuccess(5070,"提前结束成功"),
	studentWashoverFail(5071,"提前结束失败"),
	
	finishedSuccess(5080,"洗衣完成"),
	finishedFailStatus(5081,"失败 洗衣中途结束"),
	;
	
	
	
	private int errorCode;
	private String errorMsg;

	private StatusCode(int errorCode, String errorMsg) {
		this.errorCode=errorCode;
		this.errorMsg=errorMsg;
	}

	public int getCode() {
		return errorCode;
	}

	public void setCode(int errorCode) {
		this.errorCode = errorCode;
	}

	public String getMsg() {
		return errorMsg;
	}

	public void setMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}


	

}
